package com.lywz.biz.common.entity.example;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

import com.lywz.core.entity.AbstractEntity;
import com.lywz.core.entity.EntityAnnotation;
/**
 * 地址实体类
 * @author yangbl
 * date 2010-4-25
 */
@Entity
@Table(name = "test_address")
@EntityAnnotation
public class Address extends AbstractEntity {

	private static final long serialVersionUID = 4594257584799972034L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer addressid;
	private String address;
	@ManyToMany(mappedBy = "addresses")
	private Set<TUser> users;

	public Set<TUser> getUsers() {
		return users;
	}

	public void setUsers(Set<TUser> users) {
		this.users = users;
	}

	public Integer getAddressid() {
		return addressid;
	}

	public void setAddressid(Integer addressid) {
		this.addressid = addressid;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

}
